# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="4"

ESVN_REPO_URI="http://uftt.googlecode.com/svn/trunk/"
ESVN_PROJECT="uftt"

inherit eutils cmake-utils subversion

DESCRIPTION="UFTT is a simple no-nonsense tool for transferring files."
HOMEPAGE="http://code.google.com/p/uftt/"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"

IUSE="gtk qt libnotify"

DEPEND=">=dev-libs/boost-1.36.0
          dev-libs/openssl
        qt?        ( >=x11-libs/qt-4.4.0        )
        gtk?       ( >=dev-cpp/gtkmm-2.16.0     )
        libnotify? ( >=x11-libs/libnotify-0.7.2 )
"

RDEPEND="${DEPEND}"

src_prepare() {
	# Allow user patches to be applied without modifying the ebuild
	epatch_user
}

src_compile() {
	# ensure that ESVN_WC_REVISION is set
	subversion_wc_info || die "${ESVN}: unknown problem occurred while accessing working copy."

	local mycmakeargs
	mycmakeargs="${mycmakeargs} -DBVEREXTRA:STRING=-ebuild -DBVERMAJOR:STRING=0 -DBVERMINOR:STRING=1 -DBVERPATCH:STRING=${ESVN_WC_REVISION}"

	cmake-utils_src_compile 
}
